import java.util.*;

public class TZComparator implements Comparator
{
	public int compare(Object o1, Object o2)
	{
		TimeZone t1 = (TimeZone)o1;
		TimeZone t2 = (TimeZone)o2;
		String n1 = t1.getID();
		String n2 = t2.getID();
		StringTokenizer toks = new StringTokenizer(n1, "/");
		if (toks.countTokens() == 2) {
			toks.nextToken();
			n1 = toks.nextToken();
		}
		toks = new StringTokenizer(n2, "/");
		if (toks.countTokens() == 2) {
			toks.nextToken();
			n2 = toks.nextToken();
		}
		return n1.compareTo(n2);
	}
	
}